package com.legendshop.model.entity ;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.jdbc.core.RowMapper;
	
public class ProductMapper implements RowMapper<Product> {
		public Product mapRow(ResultSet rs, int rowNum) throws SQLException {
		   Product product = new Product();
		  	product.setProdId(rs.getLong("prod_id"));
		  	product.setVersion(rs.getLong("version"));
		  	product.setChannelShop(rs.getBoolean("channel_shop"));
		  	product.setChannelStore(rs.getBoolean("channel_store"));
		  	product.setFirstCatId(rs.getLong("first_cat_id"));
		  	product.setSecondCatId(rs.getLong("second_cat_id"));
		  	product.setThirdCatId(rs.getLong("third_cat_id"));
		  	product.setUnitId(rs.getString("unit_id"));
		  	product.setUnit(rs.getString("unit"));
		  	product.setShopId(rs.getLong("shop_id"));
		  	product.setName(rs.getString("name"));
		  	product.setPrice(rs.getjava.math.BigDecimal("price"));
		  	product.setCostprice(rs.getjava.math.BigDecimal("costprice"));
		  	product.setMarketprice(rs.getjava.math.BigDecimal("marketprice"));
		  	product.setDescription(rs.getString("description"));
		  	product.setBrief(rs.getString("brief"));
		  	product.setBuys(rs.getLong("buys"));
		  	product.setComments(rs.getLong("comments"));
		  	product.setPic(rs.getString("pic"));
		  	product.setImages(rs.getString("images"));
		  	product.setStatus(rs.getLong("status"));
		  	product.setStocks(rs.getLong("stocks"));
		  	product.setActualStocks(rs.getLong("actual_stocks"));
		  	product.setStocksArm(rs.getLong("stocks_arm"));
		  	product.setProdType(rs.getString("prod_type"));
		  	product.setVisualProdType(rs.getString("visual_prod_type"));
		  	product.setParameter(rs.getString("parameter"));
		  	product.setBrandId(rs.getLong("brand_id"));
		  	product.setReviewScores(rs.getLong("review_scores"));
		  	product.setSupportDist(rs.getBoolean("support_dist"));
		  	product.setCommissionRateSettingSelect(rs.getLong("commission_rate_setting_select"));
		  	product.setFirstLevelRate(rs.getDouble("first_level_rate"));
		  	product.setSecondLevelRate(rs.getDouble("second_level_rate"));
		  	product.setThirdLevelRate(rs.getDouble("third_level_rate"));
		  	product.setStoreId(rs.getLong("store_id"));
		  	product.setStoreCategory(rs.getLong("store_category"));
		  	product.setGuideId(rs.getLong("guide_id"));
		  	product.setContentM(rs.getString("content_m"));
		  	product.setContent(rs.getString("content"));
		  	product.setRecDate(rs.getDate("rec_date"));
		  	product.setModifyDate(rs.getDate("modify_date"));
		  	product.setWxACode(rs.getString("wx_a_code"));
		  	product.setAuditOpinion(rs.getString("audit_opinion"));
		  	product.setGoodsType(rs.getString("goods_type"));
		  	product.setCustomsMessageId(rs.getLong("customs_message_id"));
		  	product.setFreightType(rs.getLong("freight_type"));
		  	product.setTransportId(rs.getLong("transport_id"));
		  	product.setSettledFreight(rs.getjava.math.BigDecimal("settled_freight"));
		  	product.setCustomDutyType(rs.getString("custom_duty_type"));
		  	product.setCrossBorderType(rs.getString("cross_border_type"));
		  	product.setEnableWarrantyCard(rs.getBoolean("enable_warranty_card"));
		  	product.setWarrantyCardEffectiveTime(rs.getLong("warranty_card_effective_time"));
		  	product.setSupplierSpuId(rs.getLong("supplier_spu_id"));
		  	product.setProdSource(rs.getString("prod_source"));
		  	product.setFloatType(rs.getString("float_type"));
		  	product.setFloatValue(rs.getjava.math.BigDecimal("float_value"));
		  	product.setDisplaySupplierInformation(rs.getBoolean("display_supplier_information"));
		  	product.setDeliveryType(rs.getString("delivery_type"));
		  	product.setSupportEmployeeReward(rs.getBoolean("support_employee_reward"));
		  	product.setTaxesSwitch(rs.getBoolean("taxes_switch"));
		  	product.setInvalidStatus(rs.getLong("invalid_status"));
		  	product.setContentImages(rs.getString("content_images"));
		  	product.setForceOnline(rs.getBoolean("force_online"));
		  	product.setSupportTeamAward(rs.getBoolean("support_team_award"));
		  	product.setSupportPerformanceAward(rs.getBoolean("support_performance_award"));
		  	product.setVideo(rs.getString("video"));
		  	product.setMarketId(rs.getLong("market_id"));
		  	product.setSupplierId(rs.getLong("supplier_id"));
		  	product.setSecondSupplierId(rs.getLong("second_supplier_id"));
		  	product.setJsonInfo(rs.getString("json_info"));
		  	product.setSalesMarketProductStatus(rs.getLong("sales_market_product_status"));
		  return product;
		}

}